<a href=/accounts/login/>login</a>
<a href=/accounts/logout/>logout</a>
<a href=/accounts/register/>register</a>
<a href=/yakitori/add_article/>add article</a>
<br>
<!-- auto refresh the content area with setTimeout -->
<!-- //example: -->
<!-- http://www.quackit.com/javascript/javascript_refresh_page.cfm -->

<!-- //javascript here: -->
<!-- http://www.xml.com/pub/a/2006/09/13/rss-and-ajax-a-simple-news-reader.html?page=1 -->

<!-- //feed source -->
<!-- feed://news.google.com.sg/news?pz=1&cf=all&ned=en_sg&hl=en&topic=h&num=3&output=rss -->
<!--
You are free to copy and use this sample in accordance with the terms of the
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
-->


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google AJAX Search API Sample</title>
   
<script src="https://www.google.com/jsapi?key=ABQIAAAATTYLICTXTwICWW4to5cDSRSQmftY1tMK-lb_MTVEEw9Pw0zDhBQ2aN5Fc6eDeNeKqtCdb3RedA9Amw" type="text/javascript"></script>
    <script type="text/javascript">
    /*
    *  How to load a feed via the Feeds API.
    */
    
    google.load("feeds", "1");
    
    // Our callback function, for when a feed is loaded.
    function feedLoaded(result) {
      if (!result.error) {
        // Grab the container we will put the results into
        var container = document.getElementById("content");
        container.innerHTML = '';
    
        // Loop through the feeds, putting the titles onto the page.
        // Check out the result object for a list of properties returned in each entry.
        // http://code.google.com/apis/ajaxfeeds/documentation/reference.html#JSON
        for (var i = 0; i < result.feed.entries.length; i++) {
          var entry = result.feed.entries[i];
          var div = document.createElement("div");
         
//	  var link = document.createElement('a');
 //         link.setAttribute('href', entry.link);
//			    link.setAttribute('name', entry.title);
			    //          div.appendChild(link);

var oImg=document.createElement("img");
//oImg.setAttribute('src', entry.mediaGroup.);
oImg.setAttribute('alt', 'na');
oImg.setAttribute('height', '1px');
oImg.setAttribute('width', '1px');
  var content = document.getElementById('content');
    content.innerHTML = '<a href="' + entry.link + '">' + entry.title + '</a>';
          div.appendChild(document.createElement('br')); // Add a new line			    
          var csp=document.createElement('div');
          csp.innerHTML=entry.content;	    
          div.appendChild(csp);
	  div.appendChild(document.createTextNode(entry.content));		    
          container.appendChild(div);
        }
      }
    }
    
    function OnLoad() {
      // Create a feed instance that will grab Digg's feed.
//      var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml");
      var feed = new google.feeds.Feed("http://news.google.com.sg/news?pz=1&cf=all&ned=en_sg&hl=en&topic=h&num=3&output=rss"); 
feed.setNumEntries(1);

      // Calling load sends the request off.  It requires a callback function.
      feed.load(feedLoaded);
    }
    
    google.setOnLoadCallback(OnLoad);
    </script>
  </head>
  <body style="font-family: Arial;border: 0 none;">
    <div id="content">Loading...</div>
  </body>
</html>
​
